Page({
  // 获取我的报修页面
  data: {
    pageSize: 10,
    current: 1,
    repairList: []
  },
  onLoad() {
    this.getRepairList()
  },
  async getRepairList() {
    const { pageSize, current } = this.data
    const res = await wx.http.get('/repair', { pageSize, current })
    this.setData({
      repairList: res.data.rows
    })
  },
  goDetail(e) {
    // console.log(e);
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + e.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
})
